Libraries and settings

1. Import and format carbon chemestry data

Notes: * duplicated labels LK and 21LK; WS and WS cruise

Add seasonality

  • Winter: Dec 20-March 19

  • Spring: March 20-June 18

  • Summer: June 19-Sep 20

  • Fall: Sep 21-Dec 19

  • Wet: May - October

  • Dry: November - April

Subset only FK data

  • This removes samples from Gulf of Mexico
  • Add reef zone: “Inshore”, “Mid channel”, “Offshore”, “Oceanic”
  • Add reef subregion: “BB”, “UK”, “MK”, “LK”
 #Get only FLK data#
  Metadata<-read.csv("Data/FLKLocations.csv", header = T)
  
  FLK.data<-join(CC.data, Metadata, 
                 type = "left", by="SiteID")
  str(FLK.data)
## 'data.frame':    1977 obs. of  84 variables:
##  $ CTDID                  : chr  "WS10067_1" "WS10067_2" "WS10067_3" "WS10067_4" ...
##  $ Region                 : chr  "FL" "FL" "FL" "FL" ...
##  $ Year                   : num  2010 2010 2010 2010 2010 2010 2010 2010 2010 2010 ...
##  $ Mission                : chr  "WaltonSmith" "WaltonSmith" "WaltonSmith" "WaltonSmith" ...
##  $ Location               : chr  "Upper_Keys" "Upper_Keys" "Upper_Keys" "Upper_Keys" ...
##  $ Latitude               : num  25.6 25.6 25.1 25.1 25.1 ...
##  $ Longitude              : num  -80.1 -80.1 -80.4 -80.4 -80.3 ...
##  $ UTCDate                : Date, format: "10-03-08" "10-03-08" ...
##  $ UTCTime                : chr  "12:26:00 PM" "01:05:00 PM" "05:17:00 PM" "05:42:00 PM" ...
##  $ Sample_Depth_m         : num  0 0 0 0 0 0 0 0 0 0 ...
##  $ DIC_umol_kg            : num  2073 2068 2187 2112 2081 ...
##  $ TA_umol_kg             : num  2424 2418 2558 2446 2428 ...
##  $ pH_measured            : num  NA NA NA NA NA NA NA NA NA NA ...
##  $ pH_calculated          : num  8.16 8.14 8.19 8.15 8.15 ...
##  $ pCO2_uatm              : num  302 317 293 313 314 ...
##  $ Aragonite_Sat_W        : num  3.83 3.83 4.07 3.62 3.79 ...
##  $ Salinity_Bottle        : num  NA NA NA NA NA NA NA NA NA NA ...
##  $ Conductivity_Sm        : logi  NA NA NA NA NA NA ...
##  $ Salinity_CTD           : num  36.5 36.5 36.7 36.7 36.6 ...
##  $ Temperature_C          : num  20.4 21.6 18.8 18.8 20.8 ...
##  $ Pressure_db            : num  0 0 0 0 0 0 0 0 0 0 ...
##  $ Density_Sigmat         : logi  NA NA NA NA NA NA ...
##  $ SiteID                 : Factor w/ 112 levels "","1","10","11",..: 2 29 37 46 47 68 69 80 83 85 ...
##  $ Survey_design          : chr  "Permanent" "Permanent" "Permanent" "Permanent" ...
##  $ Sample_frequency       : chr  "Single" "Single" "Single" "Single" ...
##  $ ncrmp_flag             : int  1 1 1 1 1 1 1 1 1 1 ...
##  $ bottle_id              : int  10021 10022 10023 10024 10025 10026 10027 10028 10029 10030 ...
##  $ source_code            : chr  "E" "E" "E" "E" ...
##  $ sample_num             : int  1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 ...
##  $ bottle_name            : chr  "1" "2" "3" "4" ...
##  $ deployment_id          : int  517 517 517 517 517 517 517 517 517 517 ...
##  $ project_code           : chr  "Walton Smith" "Walton Smith" "Walton Smith" "Walton Smith" ...
##  $ collection_id          : int  9221 9222 9223 9224 9225 9226 9227 9228 9229 9230 ...
##  $ collected_date         : chr  "03/08/10" "03/08/10" "03/08/10" "03/08/10" ...
##  $ collected_time         : chr  "12:26:00 PM" "01:05:00 PM" "05:17:00 PM" "05:42:00 PM" ...
##  $ collected_timezone     : chr  "12:00:00 AM" "12:00:00 AM" "12:00:00 AM" "12:00:00 AM" ...
##  $ density_id             : int  NA NA NA NA NA NA NA NA NA NA ...
##  $ dic_id                 : int  17166 17167 17168 17169 17170 17171 17172 17173 17174 17175 ...
##  $ calc_avg_dic           : num  2086 2081 2200 2125 2094 ...
##  $ dic_temp               : num  NA NA NA NA NA NA NA NA NA NA ...
##  $ dic_machine            : chr  "SOMMA" "SOMMA" "SOMMA" "SOMMA" ...
##  $ dic_kg_flag            : int  1 1 1 1 1 1 1 1 1 1 ...
##  $ calibration_dic_id     : int  590 590 590 590 590 590 590 590 590 590 ...
##  $ calc_avg_crm_init_dic  : num  2014 2014 2014 2014 2014 ...
##  $ crm_init_dic_temp      : num  NA NA NA NA NA NA NA NA NA NA ...
##  $ calibration_dic_kg_flag: int  1 1 1 1 1 1 1 1 1 1 ...
##  $ dic_crm_id             : int  16 16 16 16 16 16 16 16 16 16 ...
##  $ dic_crm_batch          : int  85 85 85 85 85 85 85 85 85 85 ...
##  $ dic_crm_dic            : num  2000 2000 2000 2000 2000 ...
##  $ dic_crm_salinity       : num  33.3 33.3 33.3 33.3 33.3 ...
##  $ ta_id                  : int  9096 9097 9098 9099 9100 9101 9102 9103 9104 9105 ...
##  $ calc_avg_ta            : num  2455 2450 2590 2477 2459 ...
##  $ calc_avg_ta_temp       : num  NA NA NA NA NA NA NA NA NA NA ...
##  $ ta_machine             : chr  "Langdonometer" "Langdonometer" "Langdonometer" "Langdonometer" ...
##  $ ta_kg_flag             : int  1 1 1 1 1 1 1 1 1 1 ...
##  $ calibration_ta_id      : int  626 626 626 626 626 626 626 626 626 626 ...
##  $ calc_avg_crm_ta        : num  2215 2215 2215 2215 2215 ...
##  $ calc_avg_crm_ta_temp   : num  NA NA NA NA NA NA NA NA NA NA ...
##  $ calibration_ta_kg_flag : int  1 1 1 1 1 1 1 1 1 1 ...
##  $ ta_crm_id              : int  16 16 16 16 16 16 16 16 16 16 ...
##  $ ta_crm_batch           : int  85 85 85 85 85 85 85 85 85 85 ...
##  $ ta_crm_ta              : num  2184 2184 2184 2184 2184 ...
##  $ ta_crm_salinity        : num  33.3 33.3 33.3 33.3 33.3 ...
##  $ spec_ph_id             : int  NA NA NA NA NA NA NA NA NA NA ...
##  $ spec_ph_temp           : num  NA NA NA NA NA NA NA NA NA NA ...
##  $ rm_factor              : num  NA NA NA NA NA NA NA NA NA NA ...
##  $ seacarb_id             : int  4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 ...
##  $ UTCDate_Time           : POSIXct, format: "2010-03-08 12:26:00" "2010-03-08 13:05:00" ...
##  $ datetime               : POSIXct, format: "2010-03-08 07:26:00" "2010-03-08 08:05:00" ...
##  $ ESTDate                : Date, format: "2010-03-08" "2010-03-08" ...
##  $ ESTTime                : chr  "07:26:00" "08:05:00" "12:17:00" "12:42:00" ...
##  $ Month                  : Factor w/ 12 levels "Apr","May","Jun",..: 12 12 12 12 12 12 12 12 12 12 ...
##  $ Months                 : Factor w/ 12 levels "January","February",..: 3 3 3 3 3 3 3 3 3 3 ...
##  $ MY                     : chr  "2010-03" "2010-03" "2010-03" "2010-03" ...
##  $ MoY                    : num  3 3 3 3 3 3 3 3 3 3 ...
##  $ ToD                    : num  7.43 8.08 12.28 12.7 12.75 ...
##  $ Season                 : chr  "Winter" "Winter" "Winter" "Winter" ...
##  $ Precipitation          : chr  "Dry" "Dry" "Dry" "Dry" ...
##  $ dec.lon                : num  -80.1 -80.1 -80.4 -80.4 -80.3 ...
##  $ dec.lat                : num  25.6 25.6 25.1 25.1 25.1 ...
##  $ Zone                   : chr  "Inshore" "Offshore" "Inshore" "Inshore" ...
##  $ Sub_region             : chr  "BB" "BB" "UK" "UK" ...
##  $ Reference              : chr  "BB_1" "BB_1" "UK_3" "UK_3" ...
##  $ Transect               : chr  "T1" "T1" "T1" "T1" ...
  FLK.data<-subset(FLK.data, FLK.data$Sub_region!="NA")
  
  FLK.data$Sub_region<-factor(FLK.data$Sub_region, levels = c(
                        "BB", "UK", "MK", "LK"))

  FLK.data$Zone<-factor(FLK.data$Zone, levels = c(
                        "Inshore", "Mid channel", 
                        "Offshore", "Oceanic"))

Label known extreme events to check outliers

# Label and filter extreme events
  FLK.data$Extreme<-"Normal"
  FLK.data$Extreme[FLK.data$MY=="2010-03"] <-"ColdMortality"
  FLK.data$Extreme[FLK.data$MY=="2010-08"] <-"Waves/Overcast"
  FLK.data$Extreme[FLK.data$MY=="2011-10"] <-"LowSalinty"
  FLK.data$Extreme[FLK.data$MY=="2011-08"] <-"HighOmega_NoReason"
  FLK.data$Extreme[FLK.data$MY=="2019-07"] <-"Low_pH"
  FLK.data$Extreme[FLK.data$MY=="2019-09"] <-"Low_pH"
  FLK.data$Extreme[FLK.data$MY=="2019-11"] <-"Low_pH"
  FLK.data$Extreme<-as.factor(FLK.data$Extreme)

2. Check data available

2.1 Locations (all samples)

Figure: Map of the sites where individual samples were collected

Notes: * Check location of individual SiteIDs

2.2 Average GPS point location

# Coordinates<-select(FLK.data, "CTDID", "Latitude", "Longitude", "SiteID")
# Coordinates<-join(Coordinates, WS.GPS.Sites,
#                  type = "left", by="SiteID")
# Coordinates$Lat_diff<-abs(Coordinates$Latitude-Coordinates$Lat)
# Coordinates$Lon_diff<-abs(Coordinates$Longitude-Coordinates$Lon)
# Check.coordinates1<- Coordinates[(Coordinates$Lat_diff>0.02), ]
# Check.coordinates2<- Coordinates[(Coordinates$Lon_diff>0.02), ]
# Check.coordinates<- rbind(Check.coordinates1, Check.coordinates2)
# Check.coordinates<-unique(Check.coordinates)
#write.csv(Check.coordinates, "FLK_results/2_CheckGPS_points_v3.csv")

Figure: Permanent location of WS stations

2.3 Number of samples

By zone and location

Sub_region Inshore Mid channel Offshore Oceanic
BB 84 76 83
UK 107 71 111 37
MK 129 129 130 83
LK 138 138 171 87

By year and sub_region

Samples collected each year
Sub_region 2010 2011 2012 2014 2015 2016 2017 2018 2019 2020 2021
BB 4 14 3 6 30 36 30 35 24 24 37
UK 7 19 3 8 45 51 42 45 30 31 45
MK 15 51 9 11 55 66 55 56 44 44 65
LK 18 61 9 11 58 72 60 76 53 46 70

By climatological season and region

Samples collected in each seson
Sub_region Fall Spring Summer Winter
LK 149 133 129 123
MK 133 120 121 97
UK 88 82 84 72
BB 68 60 63 52

By Month-year

Samples collected by year-month
2010 2011 2012 2014 2015 2016 2017 2018 2019 2020 2021 Months
38 38 19 6 35 January
16 22 38 February
24 2 38 35 33 March
24 38 16 35 37 April
38 16 28 May
20 24 38 38 35 8 June
37 38 18 36 25 July
28 20 38 35 10 August
38 38 36 September
28 38 18 38 36 October
37 35 38 November
25 36 37 37 35 December

By Month-region

Samples collected by month-location
Sub_region Zone Apr May Jun Jul Aug Sep Oct Nov Dec Jan Feb Mar
BB Inshore 9 4 8 10 5 6 8 6 10 7 4 7
BB Mid channel 9 4 5 10 5 6 7 6 8 7 3 6
BB Offshore 9 4 8 10 5 6 8 6 9 7 4 7
UK Inshore 13 6 8 13 8 7 9 9 11 10 4 9
UK Mid channel 6 3 9 9 3 6 6 5 8 7 2 7
UK Offshore 11 5 12 14 6 9 11 8 11 12 3 9
UK Oceanic 3 1 5 4 2 3 4 2 4 3 2 4
MK Inshore 12 8 15 13 11 9 13 9 14 10 6 9
MK Mid channel 12 8 13 13 11 9 13 9 14 9 7 11
MK Offshore 13 7 13 13 11 9 13 9 15 10 6 11
MK Oceanic 7 4 8 8 8 6 8 6 10 6 5 7
LK Inshore 12 7 16 9 15 9 15 9 15 11 8 12
LK Mid channel 12 7 15 10 13 9 15 9 15 12 9 12
LK Offshore 14 10 18 13 18 12 19 12 17 18 7 13
LK Oceanic 8 4 10 5 10 6 9 5 9 7 6 8

Per station during all sampling time

Samples collected in SiteIDs
SiteID 2010 2011 2012 2014 2015 2016 2017 2018 2019 2020 2021
1 2 6 1 1 5 6 5 6 4 4 6
10 2 5 1 1 5 6 5 5 4 4 5
11 2 4 1 1 5 6 5 5 4 4 6
12 1 5 1 1 5 6 5 6 4 4 6
13 1 4 1 1 5 6 5 4 4 4 6
14 1 3 1 1 5 6 5 5 4 4 6
16 2 6 1 1 5 6 5 6 4 4 5
17 2 6 1 1 5 6 5 7 4 4 5
18 2 6 1 1 5 6 5 7 4 4 6
19 2 6 1 5 6 5 6 4 4 6
20 2 5 1 1 5 6 5 6 4 4 6
21.5 2 6 1 1 4 6 5 5 4 3 6
21LK 1 5 1 5 6 5 5 4 4 6
22 1 3 1 1 5 6 5 7 5 4 6
22.5 1 6 1 1 4 6 5 6 5 3 6
23 1 6 1 1 5 6 5 7 5 4 6
24 2 6 1 1 5 6 5 7 5 4 6
3 2 6 1 1 5 6 5 6 4 4 6
4 1 4 1 5 6 5 4 2 3 4
5 1 4 1 1 5 6 5 4 2 3 4
5.5 2 2 1 1 5 5 4 4 3 3 4
6 2 4 1 5 5 4 4 3 3 5
6.5 1 5 1 1 5 5 4 4 3 3 5
7 2 6 1 5 6 5 6 4 4 6
8 2 5 1 1 5 6 5 6 4 4 6
9 2 6 1 5 6 5 6 4 4 6
9.5 2 6 1 1 5 6 5 4 4 4 6
15 4 1 1 5 6 5 5 4 4 6
15.5 3 1 1 5 6 5 4 4 4 6
2 2 1 1 5 6 5 6 4 4 6
EK_IN 1 5 6 5 6 4 4 7
EK_MID 1 5 6 5 5 4 4 6
EK_OFF 1 5 6 5 6 4 4 6
UK_IN 1 5 6 5 6 4 4 5
UK_MID 1 5 6 5 6 4 4 6
UK_OFF 1 5 6 5 6 4 4 6
MR 5 6 5 7 5 4 6
WS 5 6 5 7 5 4 6

3. TA and DIC salinity normalization

Salinity standarizations

  1. Use salinity Bottle first, if not available, salinity CTD

  2. Calculate TA intercepts

# TA_coef <- FLK.data %>% 
#                 group_by(Region) %>%
#                 do({model = lm(TA_umol_kg~BestSalinity, data=.)  # model
#                     data.frame(tidy(model), # get coefficient info
#                     glance(model))})        # get model info
    
 TA_coef <- FLK.data[FLK.data$Zone=="Oceanic",] %>% 
                 group_by(Region) %>%
                 do({model = lm(TA_umol_kg~BestSalinity, data=.)  # model
                     data.frame(tidy(model), # get coefficient info
                     glance(model))})        # get model info
  1. Calculate DIC intercepts
    DIC_coef <- FLK.data[FLK.data$Zone=="Oceanic",] %>% 
                  group_by(Region) %>%
                  do({model = lm(DIC_umol_kg~BestSalinity, data=.)  
                  # create model
                  data.frame(tidy(model), # get coefficient info
                  glance(model))})        # get model info

    # DIC_coef <- FLK.data %>% 
    #               group_by(Region) %>%
    #               do({model = lm(DIC_umol_kg~BestSalinity, data=.)  
    #               # create model
    #               data.frame(tidy(model), # get coefficient info
    #               glance(model))})        # get model info
  1. Normalize with Friss equation
# 4. Normalize the data
  TA_TO<-subset(TA_coef, term=="(Intercept)")
  TA_TO<-as.data.frame(select(TA_TO, c(Region, estimate)))
  names(TA_TO)[2] <- "TA_0"
  
  DIC_TO<-subset(DIC_coef, term=="(Intercept)")
  DIC_TO<-as.data.frame(select(DIC_TO, c(Region, estimate)))
  names(DIC_TO)[2] <- "DIC_0"
    
  Intercepts<-join(TA_TO, DIC_TO, by="Region", type="full")
  FLK.data<-join(FLK.data, Intercepts, by="Region", type="left")
FLK.data$nTA<-(
    (FLK.data$TA_umol_kg-FLK.data$TA_0)/
    FLK.data$BestSalinity)*MeanSalinity+FLK.data$TA_0

  FLK.data$nDIC<-(
    (FLK.data$DIC_umol_kg-FLK.data$DIC_0)/
    FLK.data$BestSalinity)*MeanSalinity+FLK.data$DIC_0
  
#write.csv(FLK.data, "FLK_results/FLK.data_normalized.csv", row.names = F)
  1. TA parameters to nTA
kable(as.data.frame(TA_coef[,1:8], format = "markdown"), 
      caption = "TA parameters for normalization", digits = 3)
TA parameters for normalization
Region term estimate std.error statistic p.value r.squared adj.r.squared
FL (Intercept) 2111.560 57.288 36.859 0 0.099 0.094
FL BestSalinity 7.515 1.592 4.719 0 0.099 0.094
#write.csv(TA_coef, "TA_coef.csv")
# 5. Chech normalization?
#nTA_Sal<- ggplot(FLK.data[FLK.data$Zone=="Oceanic",] ) + theme_bw() +
  
nTA_Sal<- ggplot(FLK.data) + MyTheme+
facet_grid(~Zone)+
 
  geom_point(aes (BestSalinity, TA_umol_kg, fill=Season), alpha=0.5, shape=21)+
  geom_smooth(aes(BestSalinity, TA_umol_kg), linetype=2, method = "lm", color="black")+
    
  geom_point(aes (BestSalinity, nTA, fill=Season), alpha=0.5, shape=24)+
  geom_smooth(aes(BestSalinity, nTA), linetype=1, method = "lm")
    
  #geom_point(aes (BestSalinity, n35TA, fill=Season), alpha=0.5, shape=25)+
  #geom_smooth(aes(BestSalinity, n35TA), linetype=3, method = "lm")+  

#nTA_Sal
#ggsave(file="Outputs/Figure_1_Experiment_design.svg", plot=Design, dpi = 300, width=6, height=4)
  1. DIC parameters to nDIC
kable(as.data.frame(DIC_coef[,1:8], format = "markdown"), 
      caption = " DIC parameters for normalization", digits = 3)
DIC parameters for normalization
Region term estimate std.error statistic p.value r.squared adj.r.squared
FL (Intercept) 1786.677 115.049 15.530 0.000 0.025 0.02
FL BestSalinity 7.244 3.199 2.264 0.025 0.025 0.02
#write.csv(DIC_coef, "DIC_coef.csv")
nDIC_Sal<- ggplot(FLK.data) + MyTheme+
  facet_grid(~Zone)+
#nDIC_Sal<-ggplot(FLK.data[FLK.data$Zone=="Oceanic",] ) + theme_bw() +
  geom_point(aes (BestSalinity, DIC_umol_kg, fill=factor(Season)),
             alpha=0.5, shape=21)+
  geom_smooth(aes(BestSalinity, DIC_umol_kg),
              linetype=2, method = "lm", color="black")+
    
  geom_point(aes (BestSalinity, nDIC, fill=factor(Season)), alpha=0.5, shape=24)+
  geom_smooth(aes(BestSalinity, nDIC), linetype=1, method = "lm")
#nDIC_Sal

#ggsave(file="Outputs/Figure_1_Experiment_design.svg", plot=Design, dpi = 300, width=6, height=4)
FLK_parameters<-ggarrange(nTA_Sal, nDIC_Sal,
          #labels = c("DIC Friss regresion", "TA Friss regresion"),
          ncol = 1, nrow = 2)

FLK_parameters

Figure 1: Overview of linear regressions of total alkalinity (TA, µmol kg−1) and dissolved inorganic carbon (DIC, µmol kg−1) as a function of salinity + Friss normalized values.

  • Original data: Black line and circles
  • Friis normalization: blue line and triangles
  • Highest and lowest salinities are most likely wrong

Bias of hour of the day per sample (EST)

All_ToD<- ggplot(FLK.data) + 
  
  theme_bw() +
  scale_y_continuous(limits = c(0, 24),
                      expand = c(0.01, 0.01),
                      breaks = seq(0, 24, 2),
                      name="Time of the day")+
  
  theme(legend.position="bottom",
          plot.background=element_blank(),
          panel.grid = element_blank(),
          legend.box.background = element_rect(),
          panel.background =element_rect(fill = NA, 
                                         color = "black")
          )
nTA_dat<-All_ToD +geom_point(aes(nTA, ToD, colour=Sub_region))#+
  #geom_smooth(aes(nDIC, ToD, colour=Sub_region), se=F)
ggMarginal(nTA_dat, groupColour = TRUE)

nDIC_dat<-All_ToD +geom_point(aes(nDIC, ToD, colour=Sub_region))#+
  #geom_smooth(aes(nDIC, ToD, colour=Sub_region), se=F)
ggMarginal(nDIC_dat, groupColour = TRUE)

omega_dat<-All_ToD +geom_point(aes(Aragonite_Sat_W, ToD, colour=Sub_region))#+
  #geom_smooth(aes(ToD, Aragonite_Sat_W, colour=Sub_region), se=F)
ggMarginal(omega_dat, groupColour = TRUE)

4. nTA and nDIC relation

4.1 Region (all FLK samples)

nTA_nDIC<- ggplot(FLK.data, aes (nDIC, nTA)) + 
  
  scale_y_continuous(#limits = c(1700,2900),
                     #expand = c(0, 0),
                     #breaks = seq(1800, 2800, 100),
                    name="nTA") +
  scale_x_continuous(# limits = c(1600, 2600),
                     # expand = c(0, 0),
                     # breaks = seq(1500,2600,100),
                      name="nDIC")+
MyTheme

#TA_DIC+ 
 #geom_point(aes (fill=Region, shape=Season), alpha=0.5)+
 #scale_shape_manual(values=c(21, 22, 23, 24))

#ggsave(file="Outputs/Figure_1_Experiment_design.svg", plot=Design, dpi = 300, width=6, height=4)
nTA_nDIC_sea<-nTA_nDIC +
   scale_shape_manual(values=c(21,21,24, 24))+
  geom_point(aes (fill=Season, shape=Zone), alpha=0.4)+
  geom_smooth(method = "lm", colour="black")
nTA_nDIC_pre<-nTA_nDIC +
  scale_shape_manual(values=c(21,21,24, 24))+
  geom_point(aes (fill=Precipitation,  shape=Zone), alpha=0.4)+
  geom_smooth(method = "lm", colour="black")
nTA_nDIC_parameters<-ggarrange(nTA_nDIC_sea, nTA_nDIC_pre,
          #labels = c("DIC Friss regresion", "TA Friss regresion"),
          ncol = 2, nrow = 1)

nTA_nDIC_parameters

Figure 2: Linear regressions of total alkalinity (nTA) as a function of disolved inorganic carbon (nDIC) for the Florida Keys .

Does this mean anything without offshore / inshore references?

 # Individual LR for each region
    TA_DIC_lm <- FLK.data %>%
      group_by(Region) %>%
      do(mod = lm(nTA ~ nDIC, data = .))

    TA_DIC_coef <- FLK.data %>% 
                    group_by(Region) %>%
                    do({model = lm(nTA~nDIC, data=.)  
                    # create model
                    data.frame(tidy(model), # get coefficient info
                    glance(model))})        # get model info

    kable(as.data.frame(TA_DIC_coef[,1:8], format = "markdown"),
          caption = "nTA vs nDIC equations", digits = 3)
nTA vs nDIC equations
Region term estimate std.error statistic p.value r.squared adj.r.squared
FL (Intercept) 801.063 23.578 33.975 0 0.74 0.739
FL nDIC 0.768 0.012 66.386 0 0.74 0.739

4.2 By zone sub_region

nTA_nDIC_sea_zone<-nTA_nDIC_sea + facet_grid(Zone~Sub_region)
nTA_nDIC_sea_zone

nTA_nDIC_pre_zone<-nTA_nDIC_pre +  facet_grid(Zone~Sub_region)
nTA_nDIC_pre_zone

 # Individual LR for each Zone and Sub_region
    TA_DIC_lm_zone <- FLK.data %>%
      group_by(Zone, Sub_region) %>%
      do(mod = lm(nTA ~ nDIC, data = .))

    TA_DIC_coef_zone <- FLK.data %>% 
                    group_by(Zone, Sub_region) %>%
                    do({model = lm(nTA~nDIC, data=.)  
                    # create model
                    data.frame(tidy(model), # get coefficient info
                    glance(model))})        # get model info

    kable(as.data.frame(TA_DIC_coef_zone[,1:8], format = "markdown"),
          caption = "nTA vs nDIC equations", digits = 3)
nTA vs nDIC equations
Zone Sub_region term estimate std.error statistic p.value r.squared
Inshore BB (Intercept) 1059.443 82.755 12.802 0.000 0.755
Inshore BB nDIC 0.639 0.040 15.903 0.000 0.755
Inshore UK (Intercept) 1194.064 61.454 19.430 0.000 0.782
Inshore UK nDIC 0.581 0.030 19.326 0.000 0.782
Inshore MK (Intercept) 638.224 67.190 9.499 0.000 0.837
Inshore MK nDIC 0.849 0.033 25.456 0.000 0.837
Inshore LK (Intercept) 611.540 77.406 7.900 0.000 0.782
Inshore LK nDIC 0.845 0.039 21.819 0.000 0.782
Mid channel BB (Intercept) 1463.125 99.432 14.715 0.000 0.534
Mid channel BB nDIC 0.446 0.048 9.203 0.000 0.534
Mid channel UK (Intercept) 1710.133 105.684 16.182 0.000 0.369
Mid channel UK nDIC 0.328 0.052 6.351 0.000 0.369
Mid channel MK (Intercept) 776.598 86.379 8.991 0.000 0.728
Mid channel MK nDIC 0.782 0.043 18.353 0.000 0.728
Mid channel LK (Intercept) 652.923 79.371 8.226 0.000 0.774
Mid channel LK nDIC 0.837 0.039 21.448 0.000 0.774
Offshore BB (Intercept) 1468.342 140.296 10.466 0.000 0.343
Offshore BB nDIC 0.445 0.068 6.503 0.000 0.343
Offshore UK (Intercept) 1585.295 99.774 15.889 0.000 0.372
Offshore UK nDIC 0.388 0.049 7.963 0.000 0.372
Offshore MK (Intercept) 1101.649 99.094 11.117 0.000 0.565
Offshore MK nDIC 0.624 0.049 12.848 0.000 0.565
Offshore LK (Intercept) 823.857 91.742 8.980 0.000 0.636
Offshore LK nDIC 0.758 0.045 16.930 0.000 0.636
Oceanic UK (Intercept) 1947.839 176.508 11.035 0.000 0.151
Oceanic UK nDIC 0.213 0.086 2.462 0.019 0.151
Oceanic MK (Intercept) 2232.810 101.778 21.938 0.000 0.026
Oceanic MK nDIC 0.073 0.050 1.461 0.148 0.026
Oceanic LK (Intercept) 1900.529 122.199 15.553 0.000 0.158
Oceanic LK nDIC 0.235 0.060 3.945 0.000 0.158

Notes:

  • Higher slopes in TA vs. DIC
    • -> a higher NCC:NCP
    • -> calcifying (e.g., corals, sediments, and calcifying algae) relative to non-calcifying communities (e.g., fleshy algae)
  • Intermediate slopes for mixed communities of calcifiers and non-calcifiers (Anthony et al., 2013; Page et al., 2016; Lantz et al., 2017).

4.3 nTA nDIC outliers

nTA_nDIC_Extreme<- ggplot() + 
    scale_y_continuous(#limits = c(1700,2900),
                     #expand = c(0, 0),
                     #breaks = seq(1800, 2800, 100),
                    name="nTA") +
  scale_x_continuous(# limits = c(1600, 2600),
                     # expand = c(0, 0),
                     # breaks = seq(1500,2600,100),
                      name="nDIC")+
  MyTheme +  facet_grid(Zone~Sub_region)+
  geom_point(data=FLK.data, aes (nDIC, nTA, fill=Extreme), shape=21, alpha=0.8)+
  geom_smooth(data=FLK.data[FLK.data$Extreme=="Normal", ], 
              aes (nDIC, nTA), method = "lm", colour="black")
nTA_nDIC_Extreme

 # Individual LR for each Zone and Sub_region
    
    TA_DIC_coef_zone_noExtremes <- FLK.data[FLK.data$Extreme=="Normal", ] %>% 
                    group_by(Zone, Sub_region) %>%
                    do({model = lm(nTA~nDIC, data=.)  
                    # create model
                    data.frame(tidy(model), # get coefficient info
                    glance(model))})        # get model info

    kable(as.data.frame(TA_DIC_coef_zone_noExtremes[,1:8], format = "markdown"),
          caption = "nTA vs nDIC equations without extreme events", digits = 3)
nTA vs nDIC equations without extreme events
Zone Sub_region term estimate std.error statistic p.value r.squared
Inshore BB (Intercept) 989.867 84.382 11.731 0.000 0.786
Inshore BB nDIC 0.674 0.041 16.393 0.000 0.786
Inshore UK (Intercept) 1169.670 60.712 19.266 0.000 0.808
Inshore UK nDIC 0.593 0.030 19.921 0.000 0.808
Inshore MK (Intercept) 645.885 65.423 9.872 0.000 0.860
Inshore MK nDIC 0.846 0.033 25.974 0.000 0.860
Inshore LK (Intercept) 592.689 83.195 7.124 0.000 0.785
Inshore LK nDIC 0.855 0.042 20.487 0.000 0.785
Mid channel BB (Intercept) 1246.972 109.364 11.402 0.000 0.614
Mid channel BB nDIC 0.552 0.053 10.332 0.000 0.614
Mid channel UK (Intercept) 1553.603 124.023 12.527 0.000 0.418
Mid channel UK nDIC 0.405 0.061 6.667 0.000 0.418
Mid channel MK (Intercept) 698.676 75.025 9.313 0.000 0.817
Mid channel MK nDIC 0.822 0.037 22.169 0.000 0.817
Mid channel LK (Intercept) 735.616 78.104 9.418 0.000 0.785
Mid channel LK nDIC 0.797 0.038 20.698 0.000 0.785
Offshore BB (Intercept) 1160.019 172.795 6.713 0.000 0.409
Offshore BB nDIC 0.595 0.084 7.052 0.000 0.409
Offshore UK (Intercept) 1265.409 108.426 11.671 0.000 0.524
Offshore UK nDIC 0.545 0.053 10.270 0.000 0.524
Offshore MK (Intercept) 799.662 78.851 10.141 0.000 0.782
Offshore MK nDIC 0.772 0.039 19.958 0.000 0.782
Offshore LK (Intercept) 1223.653 85.134 14.373 0.000 0.559
Offshore LK nDIC 0.563 0.042 13.519 0.000 0.559
Oceanic UK (Intercept) 1541.985 200.853 7.677 0.000 0.375
Oceanic UK nDIC 0.411 0.098 4.172 0.000 0.375
Oceanic MK (Intercept) 2250.535 110.943 20.285 0.000 0.019
Oceanic MK nDIC 0.063 0.054 1.167 0.247 0.019
Oceanic LK (Intercept) 1560.316 128.211 12.170 0.000 0.365
Oceanic LK nDIC 0.401 0.063 6.393 0.000 0.365

Notes: * Offshore high nTA and nDIC during march 2012 cold mortality event - keep or remove?

5. Basic stats summary and visual

5.1 Temperature

FLK.data$Date<-FLK.data$ESTDate

Season stats

Temperature by season
Season Zone Tmin Tmax Tmean Tsd
Fall Inshore 20.01500 30.02900 25.59673 2.5421481
Fall Mid channel 21.98100 29.85110 26.62821 2.0493446
Fall Offshore 24.87700 29.97035 27.20738 1.5786848
Fall Oceanic 24.90300 30.01320 27.39854 1.5239508
Spring Inshore 22.23800 32.79000 27.85472 1.9082703
Spring Mid channel 24.46990 31.26000 27.59277 1.6558646
Spring Offshore 24.72433 31.12400 27.20822 1.4543694
Spring Oceanic 25.07167 30.70000 27.28511 1.4048604
Summer Inshore 26.85130 33.41420 30.94559 1.3603574
Summer Mid channel 27.69640 33.54900 30.66481 1.0530289
Summer Offshore 28.57000 32.47400 30.35070 0.7031212
Summer Oceanic 29.36600 31.42030 30.27019 0.4979293
Winter Inshore 17.50500 26.65400 22.66720 2.3468100
Winter Mid channel 17.91567 26.79900 23.63902 1.8934145
Winter Offshore 19.19967 27.21600 24.27852 1.5846746
Winter Oceanic 21.34400 27.30000 24.58368 1.6286770

Overview

Monthly

5.2 Salinity

Season stats

Salinity by season
Season Zone Sal_min Sal_max Sal_mean Sal_sd
Fall Inshore 30.45233 38.11319 35.35753 1.2447767
Fall Mid channel 31.88800 37.26015 35.62053 0.8406938
Fall Offshore 33.47100 36.86900 35.71652 0.6347185
Fall Oceanic 33.90255 37.18100 35.78349 0.5204920
Spring Inshore 35.08521 37.73900 36.67620 0.5579413
Spring Mid channel 35.45246 37.23920 36.44229 0.3454641
Spring Offshore 34.82339 36.73600 36.33263 0.2553492
Spring Oceanic 35.75627 36.66305 36.31844 0.2095783
Summer Inshore 32.05500 41.03199 36.17870 1.1432207
Summer Mid channel 33.94800 36.86176 35.86870 0.6988476
Summer Offshore 33.84100 36.55435 35.72740 0.6229552
Summer Oceanic 32.73250 36.51863 35.56385 0.7789012
Winter Inshore 31.23138 38.32563 35.98450 0.9184624
Winter Mid channel 33.25478 36.77829 36.12218 0.5298124
Winter Offshore 33.64836 36.62865 36.20181 0.4361290
Winter Oceanic 35.47867 36.56613 36.23997 0.2947979

Overview

Monthly

Salinity issues

Salinity_low<-FLK.data[FLK.data$BestSalinity<30, ]
Salinity_high<-FLK.data[FLK.data$BestSalinity>40, ]
Salinity_Check<-rbind(Salinity_low, Salinity_high)
Salinity_Check<-Salinity_Check[!is.na(Salinity_Check$BestSalinity),]
Salinity_Check$Problem<-"salinity"
Salinity_Check

Salinity - Temperatue correlations and outliers

5.3 Aragonite

Season stats

Omega by season
Season Zone Amin Amax Amean Asd
Fall Inshore 2.265938 4.153585 3.237630 0.3377839
Fall Mid channel 2.425071 4.194368 3.554209 0.2828936
Fall Offshore 3.172859 4.472063 3.722611 0.2317087
Fall Oceanic 3.261485 4.216995 3.779979 0.2274992
Spring Inshore 2.804235 5.083392 4.139778 0.4495737
Spring Mid channel 2.766048 4.711981 3.965309 0.3038914
Spring Offshore 2.999385 4.251338 3.780495 0.1547279
Spring Oceanic 1.998959 4.078478 3.764759 0.2894793
Summer Inshore 1.835257 5.148959 3.621862 0.5640274
Summer Mid channel 2.808160 4.918125 3.803552 0.3656937
Summer Offshore 3.110143 5.133387 3.905004 0.3108872
Summer Oceanic 3.553370 4.945832 4.016958 0.3165640
Winter Inshore 2.401692 4.886632 3.626888 0.4247764
Winter Mid channel 2.339249 4.649625 3.624081 0.3020022
Winter Offshore 3.201501 4.312818 3.651986 0.1540584
Winter Oceanic 2.491916 3.996918 3.676481 0.2192837

Overview

Monthly

Omega issues

Omega_low<-FLK.data[FLK.data$Aragonite_Sat_W<2.1, ]
Omega_low2<-FLK.data[FLK.data$Aragonite_Sat_W<3 & FLK.data$Zone=="Oceanic", ]
Omega_high<-FLK.data[FLK.data$Extreme=="HighOmega_NoReason", ]
Omega_Check<-rbind(Omega_low, Omega_low2, Omega_high)
Omega_Check<-Omega_Check[!is.na(Omega_Check$Aragonite_Sat_W),]
Omega_Check$Problem<-"omega"
Omega_Check

Omega - Temperature correlation and outliers

Omega - Salinity correlation and outliers

5.4 TA

Season stats

TA by season
Season Zone TAmin TAmax TAmean TAsd
Fall Inshore 2099.544 2609.396 2371.411 87.47261
Fall Mid channel 2174.910 2479.733 2372.264 43.14992
Fall Offshore 2245.810 2406.123 2376.256 20.65044
Fall Oceanic 2353.810 2406.854 2379.771 10.49261
Spring Inshore 2091.859 2398.144 2298.375 71.80582
Spring Mid channel 2114.163 2406.498 2353.235 52.62884
Spring Offshore 2262.590 2426.836 2376.541 21.89812
Spring Oceanic 2339.600 2403.372 2382.003 12.16319
Summer Inshore 1943.671 2494.752 2280.082 100.46661
Summer Mid channel 2131.950 2411.730 2338.454 57.52611
Summer Offshore 2293.290 2422.590 2369.555 25.84041
Summer Oceanic 2343.852 2424.110 2382.153 16.92446
Winter Inshore 2251.164 2781.489 2430.625 85.09654
Winter Mid channel 2274.057 2678.780 2401.440 50.82598
Winter Offshore 2352.434 2722.780 2389.688 36.50677
Winter Oceanic 2354.310 2420.980 2383.905 15.82864
nTA by season
Season Zone TAmin TAmax TAmean TAsd
Fall Inshore 2100.062 2622.230 2375.332 88.87421
Fall Mid channel 2183.076 2467.268 2374.259 41.58527
Fall Offshore 2255.948 2426.871 2378.143 19.89908
Fall Oceanic 2354.102 2413.657 2381.170 10.71712
Spring Inshore 2092.177 2394.805 2295.050 71.14263
Spring Mid channel 2114.175 2402.744 2350.306 52.12717
Spring Offshore 2262.578 2426.413 2374.111 21.66102
Spring Oceanic 2340.042 2399.080 2379.600 11.49296
Summer Inshore 1945.264 2491.106 2280.584 101.13850
Summer Mid channel 2131.472 2409.171 2339.601 58.30205
Summer Offshore 2290.650 2423.974 2371.553 25.92975
Summer Oceanic 2352.406 2430.996 2385.388 14.82703
Winter Inshore 2251.407 2799.240 2431.781 89.97731
Winter Mid channel 2287.465 2686.370 2400.489 51.34077
Winter Offshore 2351.532 2719.498 2388.230 36.61700
Winter Oceanic 2354.914 2416.243 2382.094 15.59514

Overview - outliers

Monthly

nTA issues

TA_low<-FLK.data[FLK.data$nTA<2000, ] # One sample (WS20231_26) low TA no DIC
TA_high<-FLK.data[FLK.data$nTA>2780, ] # One sample (WS17030_16) high
TA_Check<-rbind(TA_low, TA_high)
TA_Check<-TA_Check[!is.na(TA_Check$nTA),]
TA_Check$Problem<-"TA"
TA_Check

Omega- nTA scatterplot and outliers

5.5 DIC

Season stats

DIC by season
Season Zone DIC_min DIC_max DIC_mean DIC_sd
Fall Inshore 1834.164 2347.652 2088.697 84.08436
Fall Mid channel 1940.415 2188.637 2060.520 40.73712
Fall Offshore 1956.640 2113.588 2049.048 29.11836
Fall Oceanic 1957.930 2118.330 2047.986 29.49927
Spring Inshore 1724.374 2078.210 1923.199 72.07535
Spring Mid channel 1793.125 2109.220 2000.008 54.45072
Spring Offshore 1918.379 2118.600 2042.020 24.54888
Spring Oceanic 2003.835 2182.680 2049.730 24.77367
Summer Inshore 1704.388 2186.988 1970.661 94.51700
Summer Mid channel 1783.686 2159.260 2009.134 59.21836
Summer Offshore 1925.061 2108.781 2032.781 32.27661
Summer Oceanic 1979.375 2102.520 2036.585 28.68785
Winter Inshore 1943.358 2429.507 2106.100 87.95805
Winter Mid channel 1991.463 2310.755 2076.757 53.87955
Winter Offshore 2012.429 2339.885 2062.173 33.69393
Winter Oceanic 2016.510 2158.478 2054.552 23.70995
nDIC by season
Season Zone nDIC_min nDIC_max nDIC_mean nDIC_sd
Fall Inshore 1832.114 2362.113 2094.227 85.92126
Fall Mid channel 1955.011 2178.232 2063.105 39.13664
Fall Offshore 1964.219 2115.344 2051.026 28.35117
Fall Oceanic 1962.517 2130.570 2049.597 29.94949
Spring Inshore 1723.884 2080.800 1921.052 71.80370
Spring Mid channel 1793.154 2111.825 1997.540 54.32813
Spring Offshore 1918.368 2117.514 2039.684 24.38300
Spring Oceanic 2002.499 2183.448 2047.425 24.80804
Summer Inshore 1710.799 2197.361 1971.612 96.78660
Summer Mid channel 1783.699 2171.356 2010.607 61.57434
Summer Offshore 1923.051 2114.592 2034.842 33.28861
Summer Oceanic 1980.744 2103.706 2039.835 28.78964
Winter Inshore 1938.599 2446.540 2107.336 92.33377
Winter Mid channel 1988.309 2317.768 2076.023 55.15772
Winter Offshore 2010.683 2336.915 2060.726 34.18601
Winter Oceanic 2017.082 2158.698 2052.812 24.05237

Overview - outliers

Monthly

nDIC issues

Not filtering additional data becuase of nDIC

Omega - nDIC scatterplot and outliers

NOTE: Review Omega calculations for 2011 - Very high values for normal DIC and TA - including offshore and ocean samples

5.6 pH

Season stats

pH by season
Season Zone pH_min pH_max pH_mean pH_sd
Fall Inshore 7.840293 8.109975 7.988004 0.0618658
Fall Mid channel 7.908322 8.092337 8.019632 0.0406883
Fall Offshore 7.937204 8.157007 8.034243 0.0379669
Fall Oceanic 7.949192 8.104629 8.038466 0.0386797
Spring Inshore 7.875770 8.271259 8.099446 0.0769675
Spring Mid channel 7.877835 8.221791 8.066494 0.0547752
Spring Offshore 7.942578 8.100547 8.040308 0.0286746
Spring Oceanic 7.730269 8.092541 8.033934 0.0495861
Summer Inshore 7.672562 8.172603 7.966685 0.0765092
Summer Mid channel 7.868227 8.125938 7.990184 0.0457906
Summer Offshore 7.883689 8.147040 8.004235 0.0413498
Summer Oceanic 7.958271 8.119377 8.020132 0.0414338
Winter Inshore 7.925370 8.246944 8.087370 0.0623184
Winter Mid channel 7.920679 8.230011 8.076427 0.0439480
Winter Offshore 8.033234 8.183797 8.073114 0.0242499
Winter Oceanic 7.902464 8.144928 8.071353 0.0348490

Overview - outliers

Monthly

pH issues

pH_low<-FLK.data[FLK.data$pH_calculated<7.95 & FLK.data$Zone=="Oceanic", ]
pH_low$Problem<-"pH(low_for_ocean)"

Omega - nDIC scatterplot and outliers

NOTE: Review Omega calculations for August 2011 - Very high values for normal DIC and TA - including offshore and ocean samples

6 Remove outliers

Remove<-rbind(Salinity_Check, Omega_Check, TA_Check, pH_low)
Remove <-Remove %>% 
        filter(!duplicated(CTDID))

#write.csv(Remove, "FLK_results/ValuesToRemove_V4.csv", row.names = F)

FLK.data_filtered<-FLK.data
#FLK.data_filtered<-FLK.data[!(FLK.data$CTDID %in% Remove$CTDID),]
FLK.data_filtered<-FLK.data_filtered%>% select (- (Survey_design: seacarb_id))
#str(FLK.data_filtered)
#write.csv(FLK.data_filtered, "FLK_results/FLK_filtered_ve3.csv", row.names = F)

7. Notes/ideas

  • Regional CC -> offshore data
  • Local carbonate chemistry:
    • Seasonal (light), storms, upwelling, salinity (rain).
    • Biological: coral/seagrass/macroalgae cover
    • Biological + Seasonal: Photosynthesis, respiration.
    • Physical: inlets, rivers, upwelling

Manzello (2012)

  • local carbonate chemistry: Variation on CO2, alkalinity, and salinity - Florida Reef Tract (FRT) data.

  • Measures total CO2 (TCO2) - colometrically and total alkalinity (TA) - gran tritration. Other parameters derived

  • Predominantly in inshore / upper FRT (higher than modeled).

  • H Productivity -> net uptake of total CO2 (TCO2) -> H aragonite *Offshore reefs: oceanic carbonate chemistry consistent with present day tropical surface ocean conditions.

  • Photosynthetic uptake of TCO2 by seagrasses/macroalgae in the inshore waters of the FRT. Acidification refugia (spatial * time)

Uthicke (2014)

  • GBR - 14 Inshore fringing reefs Measured: TA and DIC. Derived:pCO2, pH and aragonite
  • TA: 2069 - 2364 mmol kg2
  • DIC:1846 - 2099 mmol kg2
  • pCO2: 340 - 554 matm
    • Higher wet seasons
    • Inshore reefs above atmospheric values.
    • Arg was not further reduced in the wet season (temp effects) *Thermodynamic effects and anthropogenic runoff (P, R and P/R ratios).
    • Expected slope of linear regression bw DIC and TA in systems where calcification is dominating is ~ 2.0

Cyronak (2018)

  • Net community production; NCP - organic
  • net community calcification; NCC inorganic
  • 23 coral reef locations across the globe - derived from TA and DIC
  • All reefs were net calcifying for the majority of observations (alkalinity depletion relative to offshore)
  • Occasional observations of net dissolution occurred at most locations
  • Influence of organic carbon fluxes on total changes in dissolved inorganic carbon (DIC) (i.e., NCP compared to the sum of NCP and NCC) = 32% to 88% -> biogeochemical differences between reefs.
  • Reefs with the largest relative percentage of NCP experienced the largest variability in seawater pH for a given change in DIC -> ability to elevate or suppress local pH relative to the open ocean.

Ian (2019)

  • Reefs and inlets were sampled
  • Reefs: Elevated pCO2 in warmer wet season
  • Inlets: more dynamic -> periodic pulses of acidified water -> more acidification than reefs.
    • Negative correlation bw salinity and both TA, and DIC. Elevated TA and DIC in low salinity waters -> carbonate dissolution as a result of organic matter decomposition?.